﻿@{
    ViewBag.Title = "DeptList";
}

<link rel="stylesheet" type="text/css" href="~/Easy-UI/easyui/1.3.4/themes/default/easyui.css" />
<link rel="stylesheet" type="text/css" href="~/Easy-UI/css/wu.css" />
<link rel="stylesheet" type="text/css" href="~/Easy-UI/css/icon.css" />
<script type="text/javascript" src="~/Easy-UI/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="~/Easy-UI/easyui/1.3.4/jquery.easyui.min.js"></script>
<script type="text/javascript" src="~/Easy-UI/easyui/1.3.4/locale/easyui-lang-zh_CN.js"></script>

<a href="#" onclick="piliangchuli()">部门列表</a>
<input class="easyui-textbox" name="loan_Contacts" data-options="prompt:'请输入部门名称查询...',validType:'txtname'" style="width:300px;height:24px">
<a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-zoom" onclick="submitcap()">搜索</a>

<table id="tt" class="easyui-datagrid" style="height:auto;">
    <thead>
        <tr>
            <th field="name1" width="70">部门编号</th>
            <th field="name2" width="120">部门名称</th>
            <th field="name3" width="200">备注</th>
            <th field="name4" width="90">是否启用</th>
            <th field="name5" width="140">创建时间</th>
            <th field="name6" width="100">创建人</th>
        </tr>
    </thead>
    <tbody>
        @foreach (var a in Model)
        {
            <tr>
                <td>@a.department_Id</td>
                <td>@a.department_Name</td>
                <td>@a.department_Remarks</td>
                @if (a.department_IsState == 0)
                {
                    <td>未启用</td>
                }
                @if (a.department_IsState == 1)
                {
                    <td>已启用</td>
                }
                <td>@a.department_CreateTime</td>
                <td>@a.department_CreatePeople</td>
            </tr>
        }
    </tbody>
</table>

<script>
    function piliangchuli() {
        $("<div/>").dialog({
            title: '添加部门',
            width: 920,
            height: 'auto',
            top: 300,
            closed: false,
            inline: false,
            loadingMessage: '正在加载...',
            cache: false,
            href: '/House/DeptAdd',
            modal: true,
            onClose: function () {
                $(this).dialog('destroy');
                mmg.load();
            }
        });
    }
</script>
